<?php

	 $db_host = 'localhost';
	 $db_user = 'function';
	 $db_pwd = 'w9ak4X1l0Y';

	 $database = 'function_a5110060';

	 $table1 = 'Sub_Location_Master';
	 $table2 = 'Sub_location_Area';

	$con = mysql_connect($db_host, $db_user, $db_pwd);
	if (!$con)
	die("Can't connect to database");
	mysql_select_db($database,$con);

	$sub_location_id = $_REQUEST['id'];

	$sql1="DELETE FROM {$table1} WHERE sub_location_id = ".$sub_location_id;
	$sql2="DELETE FROM {$table2} WHERE sub_location_id = ".$sub_location_id;
	

	//echo("Sql :".$sql1);
	//echo("Sql :".$sql2);
	//echo("Sql :".$sql3);
	$result1=mysql_query($sql1);
	$result2=mysql_query($sql2);
	
	header("Location: ../subLocation.php");
?> 